﻿Imports System.Data
Imports VSModel
Imports Cls_Common

Partial Class Control_Menu_Detail
    Inherits System.Web.UI.UserControl
#Region "Sub and Function "
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            If Not Request.QueryString("Menuid").ToString.Equals("0") Then
                hidID.Value = Request.QueryString("Menuid")
                ShowData()
            End If
        End If
    End Sub
    Protected Sub ShowData()
        Dim data As New VSEntities
        Dim p As Menu = (From q In Data.Menus Where q.MenuId = hidID.Value Select q).SingleOrDefault
        If Not p Is Nothing Then
            lblTitle.Text = IIf(IsNothing(p.Title) = True, "", p.Title)
            lblDescription.Text = IIf(IsNothing(p.Description) = True, "", p.Description)
            lblSort.Text = IIf(IsNothing(p.Sort) = True, "", p.Sort)
            lblMenuposition.Text = IIf(IsNothing(p.MenuPosition) = True, "", p.MenuPosition)
            lblStatusid.Text = IIf(IsNothing(p.StatusId) = True, "", p.StatusId)
            lblCreated.Text = IIf(IsNothing(p.Created) = True, "", p.Created)
            lblCreator.Text = IIf(IsNothing(p.Creator) = True, "", p.Creator)
            lblModified.Text = IIf(IsNothing(p.Modified) = True, "", p.Modified)
            lblModifier.Text = IIf(IsNothing(p.Modifier) = True, "", p.Modifier)
            lblBeffectivedate.Text = IIf(IsNothing(p.bEffectiveDate) = True, "", p.bEffectiveDate)
            lblEeffectivedate.Text = IIf(IsNothing(p.eEffectiveDate) = True, "", p.eEffectiveDate)
            lblParentid.Text = IIf(IsNothing(p.ParentId) = True, "", p.ParentId)
            lblPublisheddate.Text = IIf(IsNothing(p.PublishedDate) = True, "", p.PublishedDate)
            lblQuerystring.Text = IIf(IsNothing(p.QueryString) = True, "", p.QueryString)
        End If
    End Sub
#End Region
End Class
